import request from '@/utils/request'

// 查询密保和用户关联关系列表
export function listUser(query) {
  return request({
    url: '/receipt/user/list',
    method: 'get',
    params: query
  })
}

// 查询密保和用户关联关系详细
export function getUser(id) {
  return request({
    url: '/receipt/user/' + id,
    method: 'get'
  })
}

// 修改密保和用户关联关系
export function resetUser(data) {
  console.log(data);
  return request({
    url: '/receipt/user/resetUser',
    method: 'post',
    data: data
  })
}

// 新增密保和用户关联关系
export function addUser(data) {
  return request({
    url: '/receipt/user',
    method: 'post',
    data: data
  })
}

// 修改密保和用户关联关系
export function updateUser(data) {
  return request({
    url: '/receipt/user',
    method: 'put',
    data: data
  })
}

// 删除密保和用户关联关系
export function delUser(id) {
  return request({
    url: '/receipt/user/' + id,
    method: 'delete'
  })
}

// 导出密保和用户关联关系
export function exportUser(query) {
  return request({
    url: '/receipt/user/export',
    method: 'get',
    params: query
  })
}
